package com.vrv.mysqlback;

/**
 * @ClassName: ProcessKiller
 * @Desc: TODO
 * @Auther: <Bang>
 * @Date: 2021/08/27 11:17
 * @Version: 1.0
 * @Modified By:
 */
public class ProcessKiller extends Thread{

    private Process process;

    public ProcessKiller (Process process){
        this.process=process;
    }

    /**
     * If this thread was constructed using a separate
     * <code>Runnable</code> run object, then that
     * <code>Runnable</code> object's <code>run</code> method is called;
     * otherwise, this method does nothing and returns.
     * <p>
     * Subclasses of <code>Thread</code> should override this method.
     *
     * @see #start()
     * @see #stop()
     * @see #Thread(ThreadGroup, Runnable, String)
     */
    @Override
    public void run() {
        process.destroy();
    }
}
